<html>
<head>
<title>Prevent Duplicate Tabs - Options</title>
<style>
body {
  font-family:helvetica, arial, sans-serif;
  font-size:80%;
  margin:10px;
}

#header {
  padding-bottom:1.5em;
  padding-top:1.5em;
}

#header h1 {
  font-size: 156%;
  display:inline;
  padding-bottom:43px;
  padding-left:75px;
  padding-top:40px;
  background:url(icon_128.png) no-repeat;
  background-size:67px;
  background-position:1px 18px;
}

.section-header {
  background:#ebeff9;
  border-top:1px solid #b5c7de;
  font-size:99%;
  padding:3px 0 2px 5px;
  font-weight:bold;
  margin-bottom:1em;
  margin-top:4em;
}

.section-header.first {
  margin-top:1em;
}

#custom-domain {
  width:300px;
  margin-left:2px;
}

#footer {
  margin-top:4em;
}
</style>
</head>
<body onload="init()">

<div id="header"><h1>Prevent Duplicate Tab Options</h1></div>

<div class="section-header first">Black Listed URLs</div>
<div id="urlList">
	
</div>

<script>

function init() {
  var list = document.getElementById("urlList");
  
  var temp = localStorage.getItem("blackListUrls");

  
  if (temp.length == 0) {
  	var newDiv = document.createElement("div");
	newDiv.innerHTML = "There are no URLs in the black list.";
  	list.appendChild(newDiv);
	return;
  }
  
    var blackListUrls = temp.split(";");
  
  //console.log(blackListUrls.length);
  	for (a in blackListUrls) {
  		var newDiv = document.createElement("div");
  		newDiv.innerHTML = blackListUrls[a];
  		list.appendChild(newDiv); 
	}
}

function clearBlackList() {
	localStorage.clear();
	var list = document.getElementById("urlList");
	list.innerHTML = "";
}

</script>
<p><a href="#" onclick="clearBlackList()">Clear Blacklist</a></p>

<div class="section-header first">Changelog</div>
<p>
	0.1<br/>
<ul>
	<li>Initial Release</li>
</ul>
</p>
<p>
	0.2<br/>
<ul>
	<li>Fixed issue where removing an url from the blacklist was clearing all items</li>
	<li>Added "Clear Blacklist" option to this Options page.</li>
</ul>
</p>

</body>
</html>